package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2025-03-04
 * Time: 下午3:16
 */
public class demo1 {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.create_NodeList();
        myLinkedList.display();

        myLinkedList.addFirst(99);
        myLinkedList.display();

        myLinkedList.addLast(100);
        myLinkedList.display();

        myLinkedList.addIndex(1,1000);
        myLinkedList.display();

//        进行删除操作：
        myLinkedList.remove(23);
        myLinkedList.display();
        //删除头节点
        myLinkedList.remove(99);
        myLinkedList.display();
        myLinkedList.remove(100);
        myLinkedList.display();
        myLinkedList.remove(1000);
        myLinkedList.display();

        System.out.println("=====================");
        myLinkedList.clear();
        myLinkedList.display();
    }
}
